package com.castle.fortress.admin.goods.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.castle.fortress.admin.goods.entity.GoodsOptionEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
/**
 * 商品规格项目详情Mapper 接口
 *
 * @author majunjie
 * @since 2021-11-25
 */
public interface GoodsOptionMapper extends BaseMapper<GoodsOptionEntity> {

    /**
    * 扩展信息列表
    * @param pageMap
    * @param goodsOptionEntity
    * @return
    */
    List<GoodsOptionEntity> extendsList(@Param("map")Map<String, Long> pageMap, @Param("goodsOptionEntity") GoodsOptionEntity goodsOptionEntity);

    /**
    * 扩展信息记录总数
    * @param goodsOptionEntity
    * @return
    */
    Long extendsCount(@Param("goodsOptionEntity") GoodsOptionEntity goodsOptionEntity);

    /**
    * 商品规格项目详情扩展详情
    * @param id 商品规格项目详情id
    * @return
    */
    GoodsOptionEntity getByIdExtends(@Param("id")Long id);

    /**
     * 删除商品的规格项目详情 真删
     * @param goodsId
     */
    void deleteByGoodsId(Long goodsId);

    /**
     * 查询多条
     * @param params
     * @return
     */
    List<GoodsOptionEntity> selectDataList(Map<String, Object> params);
}

